In the digital still camera and the digital video camera, a solid-state imaging device has been proposed in Japanese Patent Application Laid-Open No. 2002-314062 (hereinafter referred to as “Patent Literature 1”), which has a pixel for measuring a distance having a distance measuring function (hereinafter referred to as a distance measuring pixel) arranged in a part of the imaging device or in all pixels, and detects the distance in a phase difference method. The distance measuring pixel includes a plurality of photoelectric conversion regions, and is structured so that light fluxes passed through different regions on the pupil of a camera lens are guided to different photoelectric conversion regions. Each distance measuring pixel acquires light images which are generated by the light fluxes passed through the different pupil regions, from signals obtained in the photoelectric conversion regions included in each distance measuring pixel (hereinafter referred to as an image A and an image B, and both images are collectively referred to as images AB). The phase difference method calculates the deviation amount between the images AB, convert the deviation amount to a defocused amount by using triangulation by a stereo image, and can measure the distance. Thereby, the phase difference method is different from that of a conventional contrast type, and does not need to move a lens in order to measure the distance. Accordingly, the imaging apparatus provided with the distance measuring pixel can measure the distance with a high speed and high accuracy. In addition, the signals which have been acquired in the plurality of the photoelectric conversion regions included in each distance measuring pixel can be used as pixel values of each distance measuring pixel, in order to generate a captured image. In such a distance measuring pixel, in order to suppress crosstalk between the photoelectric conversion regions, an element isolation region is arranged between the photoelectric conversion regions. However, a potential gradient is not formed in the element isolation region, and accordingly an electron which is generated by the light that is incident on the element isolation region diffuses and detection sensitivity in the photoelectric conversion region degrades. Because of this, the light which is incident on the element isolation region causes a loss, and the sensitivity degrades when the signal sent from the distance measuring pixel is used for the captured image, which is unpreferable for enhancing the image quality of the captured image.